<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>退回单打印</title>
<style media="print">
    @page {
      size: auto;  /* auto is the initial value */
      margin: 0mm; /* this affects the margin in the printer settings */
    }
</style>
<style>
* {
	font-size: 14px;
	font-family: 'SimHei','SimSun';
}

body {
	width: 100%;
	margin: 0;
	padding: 0;
}

.wrap {
	padding: 0px 50px 0 50px;
}

.title {
	text-align: center;
	font-size: 1.8em;
	text-align: center;
	margin: 30px 0 8px 0;
}

/* h3 {
	font-size: 1.8em;
	text-align: center;
	margin: 30px 0 8px 0;
} */

table th, table td {
	vertical-align: middle;
}

.form-header, .form-bottom, .vacc-bottom {
	width: 100%;
	margin: 0 auto;
}

.form-bottom, .vacc-bottom {
	margin-bottom: 20px;
}

.form-bottom tr td {
	line-height: 25px;
}

.form-header td {
	width: 50%;
}

.vacc-info, .tran-tool {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	text-align: center;
	margin-bottom: 20px;
}

.vacc-info th, .tran-tool th {
	font-weight: normal;
	/* font-size: 1.2em; */
	padding: 4px;
}

.tran-tool th {
	text-align: left;
}

.vacc-info td, .tran-tool td {
	font-size: 0.8em;
	padding: 4px;
}

.vacc-info-height td, .tran-tool td {
	height: 30px;
}

.underline, .underline2, .underline3, .underline4 {
	border-bottom: thin solid #000;
	position: relative;
}

.underline {
	padding: 0 10px;
}

.underline2 {
	padding: 0 20px;
}

.underline3 {
	padding: 0 40px;
}

.underline4 {
	/* padding: 0 40px; */
	padding: 0 60px;
}

th span {
	bottom: -1px;
}

td span {
	margin-right: 4px;
	line-height: 26px;
	bottom: -2px;
}

.mr10 {
	margin-right: 10px;
}

.w50 {
	width: 7%;
	min-width: 7%;
}

.w70 {
	width: 11%;
	min-width: 11%;
}

.w100 {
	width: 20%;
	min-width: 20%;
}

.w30 {
	width: 6%;
	min-width: 6%;
}

</style>
</head>
<body>
	<div class="wrap">
		<p class = "title">${bsVaccineOrder.supplyorgName}${fns:getDictLabel(bsVaccineOrder.cType, "bs_vaccineInfo_type", "")}疫苗退回单</p>
		<table class="form-header">
			<tr>
				<td style="width: 50%;">收货单位:&nbsp;&nbsp; ${bsVaccineOrder.receiveorgName}</td>
				<td style="width: 50%;">出库日期:<fmt:formatDate value="${bsVaccineOrder.outboundDate}" pattern="yyyy年MM月dd日"/> </td>
			</tr>
			<tr>
			    <td colspan="2">出入库单号: &nbsp;&nbsp;${bsVaccineOrder.orderNo }</td>
			</tr>
		</table>
		<table border="1" class="vacc-info vacc-info-height">
			<tr>
				<th class="w100">产品名称</th>
				<th class="w50">规格</th>
				<th class="w30">单位</th>
				<th class="w70">生产厂家</th>
				<th class="w50">批号</th>
				<th class="w70">有效期</th>
				<th class="w30">数量</th>
				<c:if test="${bsVaccineOrder.cType eq 2}">
					<th class="w30">单价</th>
					<th class="w70">金额</th>
				</c:if>
				<th class="w30">备注</th>
			</tr>
			<c:forEach items="${list}" var="li">
				<c:if test="${not empty li.vaccNum}">
					<tr>
						<td>${li.bsVaccineBatchno.vaccineName }</td>
						<td>${li.bsVaccineBatchno.dose}</td>
						<td>${li.bsVaccineBatchno.unit}</td>
						<td>${li.bsVaccineBatchno.companyName }</td>
						<td>
							${li.bsVaccineBatchno.batchno}
							<c:if test="${not empty li.bsVaccineBatchno.secondBatchno}">
						        -${li.bsVaccineBatchno.secondBatchno}
						    </c:if>
						</td>
						<td><fmt:formatDate value="${li.bsVaccineBatchno.outBoundDate}" pattern="yyyy/MM/dd"/></td>
						<td>${li.vaccNum }</td>
						<c:if test="${bsVaccineOrder.cType == '2'}">
					        <td>￥${li.sellprice}</td>
							<td>-￥${li.sellpriceSum}</td>
						</c:if>
						<td></td>
					</tr>
				</c:if>
			</c:forEach>
			<tr>
				<td colspan="1" class="text-right">合计</td>
				<c:if test="${bsVaccineOrder.cType == '2'}">
				     <td colspan="9" class="text-right">-￥${amount}</td>
				</c:if>
				<c:if test="${bsVaccineOrder.cType == '1'}">
				    <td colspan="9" class="text-right">${count}</td>
				</c:if>
			</tr>
		</table>
		<table class="form-bottom">
			<tr>
			    <td style="width: 25%;">&nbsp;&nbsp;&nbsp;制单:<span class="underline3"></span></td>
		        <td style="width: 25%;">&nbsp;&nbsp;&nbsp;&nbsp;审核:<span class="underline3"></span></td>
				<td style="width: 25%;">&nbsp;&nbsp;&nbsp;&nbsp;发货:<span class="underline3"></span></td>
				<td style="width: 25%;">&nbsp;&nbsp;&nbsp;&nbsp;验收:<span class="underline3"></span></td>
			</tr>
		</table>
	</div>
</body>
<script>
		window.print(); 
		setTimeout("top.opener=null;window.close()",1);
</script>
</html>